package com.eyealike.client;

import java.io.InputStream;

import com.eyealike.vsp.bindings.BatchIndexRequest;
import com.eyealike.vsp.bindings.BatchIndexResponse;
import com.eyealike.vsp.bindings.ClassificationRequest;
import com.eyealike.vsp.bindings.ClassificationResponse;
import com.eyealike.vsp.bindings.ComparisonResponse;
import com.eyealike.vsp.bindings.ImageCollection;
import com.eyealike.vsp.bindings.IndexRequest;
import com.eyealike.vsp.bindings.IndexResponse;
import com.eyealike.vsp.bindings.RegionOfInterestRequest;
import com.eyealike.vsp.bindings.ProductSimilarityRequest;
import com.eyealike.vsp.bindings.ProductSimilarityResponse;
import com.eyealike.vsp.bindings.ProductSimilarityResult;
import com.eyealike.vsp.bindings.QueueStatusResponse;
import com.eyealike.vsp.bindings.RegionOfInterestResponse;
import com.eyealike.vsp.bindings.SearchRequest;
import com.eyealike.vsp.bindings.SearchResponse;

public interface EyealikeAPI
{
	ImageCollection createOrUpdateCollection( ImageCollection collection ) throws EyealikePlatformException;

	boolean deleteCollection( String collectionId, boolean flush ) throws EyealikePlatformException;

	IndexResponse indexRealTime( IndexRequest request ) throws EyealikePlatformException;

	BatchIndexResponse indexBatch( BatchIndexRequest request ) throws EyealikePlatformException;

	IndexResponse nextBatchIndexResult() throws EyealikePlatformException, EmptyResponseQueueException;

	QueueStatusResponse batchIndexQueueStatus() throws EyealikePlatformException;

	boolean unindex( String imageUrl ) throws EyealikePlatformException;

	ProductSimilarityResponse queueProductSimilarityJob( ProductSimilarityRequest request )
		throws EyealikePlatformException;

	ProductSimilarityResult nextProductSimilarityResult()
		throws EyealikePlatformException,
		EmptyResponseQueueException;

	QueueStatusResponse productSimilarityQueueStatus() throws EyealikePlatformException;

	ComparisonResponse compare( String roiA, String roiB, String profileCode ) throws EyealikePlatformException;

	SearchResponse search( SearchRequest request ) throws EyealikePlatformException;

	InputStream findCachedMedia( String id ) throws EyealikePlatformException;

	boolean isCached( String id ) throws EyealikePlatformException;

	ClassificationResponse classifyRealTime( ClassificationRequest request ) throws EyealikePlatformException;

	RegionOfInterestResponse updateRoi( String roiId, RegionOfInterestRequest request ) throws EyealikePlatformException;
}
